// Progress
tdr-progress(ng-if="vm.showProgress", info="vm.progressInfo")

// Add alert hook
#addAlert(ng-if="vm.showAddAlert" flex)
	#addAlertBackground(flex layout-fill)
		#addAlertInfo(layout="column" flex layout-fill layout-align="center center")
			h3 {{vm.addAlertText}}
			md-button.md-primary(ng-click="vm.closeAddAlert()") OK

// Risks list
risks-list(
	ng-if="!vm.showProgress && vm.showRisksList()"
	risks-to-show="vm.risksToShow"
	account="vm.account"
	model="vm.model"
	revision="vm.revision"
	filter-text="vm.filterText"
	filter-chips="vm.filterChips"
	on-edit-risk="vm.editRisk(risk)"
	content-height="vm.setContentHeight(height)"
	menu-option="vm.selectedMenuOption"
	risks-card-options="vm.risksCardOptions")

// Risk
risk(
	ng-if="!vm.showProgress && vm.showRiskItem() && vm.modelSettings !== undefined"
	account="vm.account"
	data="vm.selectedRisk"
	model="vm.model"
	exit="vm.editRiskExit(risk)"
	model-settings="vm.modelSettings"
	event="vm.event"
	content-height="vm.setContentHeight(height)"
	selected-objects="vm.selectedObjects"
	revision="vm.revision"
	set-initial-selected-objects="vm.setInitialSelectedObjects({selectedObjects: selectedObjects})"
	user-job="vm.modelUserJob"
	available-jobs="vm.availableJobs")


#risksAddButton(
	ng-if="vm.showRisksList() && !vm.showProgress"
	layout="row"
	layout-align="left center"
	layout-margin)

	button(class="md-icon-button md-button md-ink-ripple"
		type="button"
		aria-label="Delete"
		ng-if="vm.showRisksList()"
		ng-click="vm.deleteSelectedRisk()"
		ng-disabled="!vm.canAddRisk || !vm.modelLoaded()")
		md-icon(
			class="angular-material-icons ng-scope material-icons"
			role="img"
			aria-hidden="true") delete

	div(
		style="text-align: center;"
		flex,
		layout-align="center center")

		span.addHint(ng-if="!vm.modelLoaded()") Model loading
		span.addHint(ng-if="!vm.canAddRisk && vm.modelLoaded()") Insufficient privileges to add a risk

	md-button.md-accent.md-fab.md-mini(
		id="addRisk"
		aria-label="Add"
		ng-click="vm.editRisk()"
		ng-disabled="!vm.canAddRisk || !vm.modelLoaded()")

		md-icon.angular-material-icons add

